﻿using System;
using System.Globalization;

namespace EmptyWallGallery.FrontEnd.inside.Contact
{
    public partial class FeedbackUpdate : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack) return;
            if (!Core.Utilities.Common.Instance.IsNumeric(Request.QueryString["ID"])) return;

            var item = Core.BLL.Feedback.Instance.GetById(Convert.ToInt32(Request.QueryString["ID"]));
            txtAddress.Text = item.Address;
            txtCreateDate.Text = item.CreateDate.ToString(CultureInfo.InvariantCulture);
            txtEmail.Text = item.ContactEmail;
            txtFax.Text = item.Fax;
            txtFullName.Text = item.ContactName;
            txtTel.Text = item.Phone;
            txtTitle.Text = item.Title;
            txtBody.Text = Core.Utilities.Common.Instance.FormatBrToMultiline(item.ContactBody);
        }
    }
}